<?php

try {

	session_start();

    $start = microtime(true);

    if (ob_start('ob_gzhandler') === false) ob_start();

    session_cache_limiter('private, must-revalidate');

    error_reporting(E_ALL | E_STRICT | E_NOTICE | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED);

    ini_set('display_errors', 1);

    date_default_timezone_set('Europe/Sofia');

    require realpath('../application/Bootstrap.php');

    Light_Core::start();

    if (LIGHT_DEBUG) {
        require LIGHT_PUBLIC_PATH . '/debug.php';
    }

} catch (Exception $e) {
    require LIGHT_APPLICATION_PATH . '/layouts/error.phtml';
}